Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix headed Chrome screenshot #93

Merged
merged 1 commit into from
Jul 26, 2023
Merged

Fix headed Chrome screenshot #93

merged 1 commit into from
Jul 26, 2023

Conversation

bearfriend
Copy link
Contributor

Fixes headed Chrome screenshots by inlining all styles to capture hover effects before they break.

@@ -30,6 +30,7 @@ export async function focusElem(elem) {

export async function hoverAt(x, y) {
await sendMouse({ type: 'move', position: [x, y] });
if (window.d2lTest) window.d2lTest.hovering = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would having the vdiff/pause stuff just add a listener on the window or body for mouseover also work? If so, it might be nice for that code to live over there where it belongs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talked offline. Sticking with this for now to avoid overusing inlineStyles, which is yucky and slow.

Base automatically changed from rtl to main July 26, 2023 18:17
Copy link
Member

@dlockhart dlockhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Crazy that we need to do this, but also crazy that it works!

@bearfriend
Copy link
Contributor Author

Crazy that we need to do this, but also crazy that it works!

Yeah, I'd definitely like to get rid of it sooner rather than later if possible.

@bearfriend bearfriend merged commit 957f1fd into main Jul 26, 2023
1 check passed
@bearfriend bearfriend deleted the chrome-headed-screenshots branch July 26, 2023 18:30
@ghost
Copy link

ghost commented Jul 26, 2023

🎉 This PR is included in version 0.22.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ghost ghost added the released label Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants